package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DirectMapper;
import com.ruoyi.system.domain.Direct;
import com.ruoyi.system.service.IDirectService;

/**
 * 直接费用Service业务层处理
 * 
 * @author xuliang
 * @date 2024-03-29
 */
@Service
public class DirectServiceImpl implements IDirectService 
{
    @Autowired
    private DirectMapper directMapper;

    /**
     * 查询直接费用
     * 
     * @param id 直接费用主键
     * @return 直接费用
     */
    @Override
    public Direct selectDirectById(Long id)
    {
        return directMapper.selectDirectById(id);
    }

    /**
     * 查询直接费用列表
     * 
     * @param direct 直接费用
     * @return 直接费用
     */
    @Override
    public List<Direct> selectDirectList(Direct direct)
    {
        return directMapper.selectDirectList(direct);
    }

    /**
     * 新增直接费用
     * 
     * @param direct 直接费用
     * @return 结果
     */
    @Override
    public int insertDirect(Direct direct)
    {
        return directMapper.insertDirect(direct);
    }

    /**
     * 修改直接费用
     * 
     * @param direct 直接费用
     * @return 结果
     */
    @Override
    public int updateDirect(Direct direct)
    {
        return directMapper.updateDirect(direct);
    }

    /**
     * 批量删除直接费用
     * 
     * @param ids 需要删除的直接费用主键
     * @return 结果
     */
    @Override
    public int deleteDirectByIds(Long[] ids)
    {
        return directMapper.deleteDirectByIds(ids);
    }

    /**
     * 删除直接费用信息
     * 
     * @param id 直接费用主键
     * @return 结果
     */
    @Override
    public int deleteDirectById(Long id)
    {
        return directMapper.deleteDirectById(id);
    }

    @Override
    public int countDirectByContractCodeAndNumber(Direct direct) {
        return directMapper.countDirectByContractCodeAndNumber(direct);
    }
}
